'use strict';
module.exports = app => {
  const { INTEGER, TINYINT, STRING, DECIMAL } = app.Sequelize;
  const Ticket = app.model.define('tickets', {
    ticket_id: {
      type: STRING,
      primaryKey: true,
    },
    buyer_id: INTEGER,
    start_station: STRING,
    end_station: STRING,
    go_date: STRING,
    go_time: STRING,
    amount: DECIMAL(8, 2),
    train_num: STRING,
    seat_num: STRING,
    seat_type: STRING,
    ticket_status: TINYINT,
    pay_status: TINYINT,
  });
  return Ticket;
};
